#include <cstdio>
#include <cmath>

const double pi = acos( -1.0 );

int n;
double v, x[ 16 ], y[ 16 ], vv[ 16 ], angle[ 16 ];
double f[ 1 << 15 ][ 15 ];

void init( )
{
    int i;
    for ( i = 0; i < n; i++ )
        scanf("%lf%lf%lf%lf", &x[ i ], &y[ i ], &angle[ i ], &vv[ i ]);
}

void work( )
{
    int i, j, k, p;
    double a, b, c, xx0, yy0, xx1, yy1, t, ans;
    for ( i = 1; i < ( 1 << n ); i++ )
        for ( j = 0; j < n; j++ )
        {
            if ( !( i & ( 1 << j ) ) ) continue;
            p = i ^ ( 1 << j );
            if ( p == 0 )
            {
                a = vv[ j ] * vv[ j ] - v * v;
                xx1 = 0;
                yy1 = 0;
                xx0 = x[ j ];
                yy0 = y[ j ];
                b = 2 * vv[ j ] * ( cos( angle[ j ] * pi / 180 ) * ( xx0 - xx1 ) + sin( angle[ j ] * pi / 180 ) * ( yy0 - yy1 ) );
                c = ( xx0 - xx1 ) * ( xx0 - xx1 ) + ( yy0 - yy1 ) * ( yy0 - yy1 );
                t = ( -b - sqrt( b * b - 4 * a * c ) ) / 2 / a;
                //printf("%lf %lf %lf %lf %lf\n", a, b, c, t, b * b - 4 * a * c);
                f[ i ][ j ] = t;
            }
            else
            {
                f[ i ][ j ] = 1e15;
                for ( k = 0; k < n; k++ )
                {
                    if ( !( p & ( 1 << k ) ) ) continue;
                    a = vv[ j ] * vv[ j ] - v * v;
                    xx1 = x[ k ] + f[ p ][ k ] * vv[ k ] * cos( angle[ k ] / 180 * pi );
                    yy1 = y[ k ] + f[ p ][ k ] * vv[ k ] * sin( angle[ k ] / 180 * pi );
                    xx0 = x[ j ] + f[ p ][ k ] * vv[ j ] * cos( angle[ j ] / 180 * pi );
                    yy0 = y[ j ] + f[ p ][ k ] * vv[ j ] * sin( angle[ j ] / 180 * pi );
                    b = 2 * vv[ j ] * ( cos( angle[ j ] * pi / 180 ) * ( xx0 - xx1 ) + sin( angle[ j ] * pi / 180 ) * ( yy0 - yy1 ) );
                    c = ( xx0 - xx1 ) * ( xx0 - xx1 ) + ( yy0 - yy1 ) * ( yy0 - yy1 );
                    t = ( -b - sqrt( b * b - 4 * a * c ) ) / 2 / a;
                    if ( f[ i ][ j ] > f[ p ][ k ] + t ) f[ i ][ j ] = f[ p ][ k ] + t;
                //    printf("%lf %lf %lf %lf %d %d %lf %d %d %lf %lf\n", xx0, yy0, xx1, yy1, i, j, f[ i ][ j ], p, k, f[ p ][ k ], t);
                }
            }
        }
    ans = f[ ( 1 << n ) - 1 ][ 0 ];
    for ( i = 1; i < n; i++ )
        if ( ans > f[ ( 1 << n ) - 1 ][ i ] )
            ans = f[ ( 1 << n ) - 1 ][ i ];
    printf("%.2lf\n", ans); 
}

int main( )
{
    while ( scanf("%d%lf", &n, &v) )
    {
        if ( n == 0 & v == 0 ) break;
        init( );
        work( );
    }
    return 0;
}
